<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

    <head>
        <title>问题详情</title>
        <div data-th-replace="layout/head"></div>
        <link th:href="@{{path}/common/v3/verify-css/verify.css?v={v}(path=${staticPath},v=${v})}" rel="stylesheet"/>
        <link th:href="@{{path}/front/web/v3/css/plugins/chosen/chosen.css?v={v}(path=${staticPath},v=${v})}" rel="stylesheet"/>
    </head>
    <body>
        <div data-th-replace="layout/common-hade-two"></div>
        <div data-th-replace="layout/qa/common-layout-qa"></div>
        <div class="cm-bg-fb" id="keyword-question-list-context">
            <div class="mb20 pt10">
                <div class="container">
                    <div class="cm-wbg__bx teacher-item-bx">
                        <div class="row">
                            <section class="col-sm-8">
                                <div class="pt10 mt20">
                                    <h4 class="text-center">描述您的问题</h4>
                                </div>
                                <div class="mt20 ml20 mr20 mb20 pb10">
                                    <form id="questionForm" role="form" class="toQuestionForm">
                                        <input type="hidden" name="gapLeft" value="0"/>
                                        <input type="hidden" name="moveLeft" value="0"/>
                                        <input type="hidden" name="packageId" th:value="${packageId}"/>
                                        <input type="hidden" name="courseId" th:value="${courseId}"/>
                                        <input type="hidden" name="catalogId" th:value="${catalogId}"/>
                                        <input type="hidden" name="teacherId" th:value="${teacherId}"/>
                                        <input type="hidden" id="imageStr" name="imageStr" value=""/>
                                        <input type="hidden" name="isFree" th:value="${type}"/>

                                        <div class="form-group clearfix">
                                            <span class="pull-right"><small class="fs12 c-ccc">最多输入200个字</small></span>
                                            <label><span class="fs14 c-333">描述问题</span><small class="fs12 c-999">（必填）</small><small class="fs12 c-danger">*</small></label>
                                            <textarea  name="context" rows="6" style="resize: none;" placeholder="输入问题描述，简洁，明了" class="form-control unRadius"></textarea>
                                        </div>
                                        <div class="form-group clearfix">
                                            <label><span class="fs14 c-333">选择问答分类</span><small class="fs12 c-999">（必选）</small><small class="fs12 c-danger">*</small></label>
                                            <div class="wSelectBox">
                                                <select data-placeholder="请选择问答分类..." name="typeId" class="chosen-select" tabindex="3">
                                                    <option th:if="${#lists.size(qaTypeList)} == 1" th:value="${qaTypeList[0]['id']}" hassubinfo="false" th:text="${qaTypeList[0]['typeName']}"></option>
                                                    <div th:if="${#lists.size(qaTypeList)} > 1">
                                                        <option value="0" hassubinfo="false">请选择问答分类...</option>
                                                        <option th:each="qaType:${qaTypeList}" th:value="${qaType['id']}" hassubinfo="false" th:text="${qaType['typeName']}"></option>
                                                    </div>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group clearfix">
                                            <label><span class="fs14 c-333">选择标签</span><small class="fs12 c-999">（最多选择4个）</small></label>
                                            <div class="wSelectBox">
                                                <select data-placeholder="请选择所属标签..." name="tagIds[]" multiple class="chosen-select" tabindex="3">
                                                    <option th:if="!${#lists.isEmpty(tagList)}" hassubinfo="true" th:each="tag:${tagList}" th:value="${tag['id']}" th:text="${tag['tagName']}"></option>
                                                </select>
                                            </div>
                                        </div>
                                        <div th:if="${type}==1 and ${isCourse}">
                                            <div th:if="!${#maps.isEmpty(packageCourse)} or !${#lists.isEmpty(packageList)}" class="form-group clearfix">
                                                <label><span class="fs14 c-333">选择套餐</span></label>
                                                <div class="wSelectBox">
                                                    <select th:disabled="${isCourse}" data-placeholder="请选择问题所属套餐..." id="select2" name="packageId" class="chosen-select" tabindex="3">
                                                        <!--当针对套餐提问时-->
                                                        <option th:if="!${#maps.isEmpty(packageCourse)}" th:value="${packageCourse['id']}" hassubinfo="false" th:text="${packageCourse['courseName']}"></option>
                                                        <!--当不针对套餐提问时-->
                                                        <div th:if="!${#lists.isEmpty(packageList)}">
                                                            <option value="0" hassubinfo="false">请选择问题所属套餐...</option>
                                                            <option th:each="package:${packageList}" th:value="${package['id']}" th:text="${package['courseName']}"></option>
                                                        </div>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group clearfix">
                                                <label><span class="fs14 c-333">选择课程</span></label>
                                                <div class="wSelectBox">
                                                    <select th:disabled="${isCourse}" data-placeholder="请选择问题所属课程..." id="select3" name="courseId" class="chosen-select" tabindex="3">
                                                        <!--当针对课程提问时-->
                                                        <option th:if="!${#maps.isEmpty(course)}" th:value="${course['id']}" hassubinfo="false" th:text="${course['courseName']}"></option>
                                                        <!--不针对课程提问时-->
                                                        <option th:if="${#maps.isEmpty(course)}" value="0" hassubinfo="false">请选择问题所属课程...</option>
                                                        <option th:if="!${#lists.isEmpty(courseList)}" th:each="course:${courseList}" th:value="${course['id']}" hassubinfo="false" th:text="${course['courseName']}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group clearfix">
                                                <label>
                                                    <span class="fs14 c-333">选择章节</span>
                                                </label>
                                                <div class="wSelectBox">
                                                    <select th:disabled="${isCourse}" data-placeholder="请选择问题所属章节..." id="select4" name="catalogId" class="chosen-select" tabindex="3">
                                                        <option th:if="${#maps.isEmpty(courseCatalog)}" value="0" hassubinfo="false">请选择问题所属章节...</option>
                                                        <option th:if="!${#maps.isEmpty(courseCatalog)}" th:value="${courseCatalog['id']}" hassubinfo="false" th:text="${courseCatalog['catalogName']}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="mt10">
                                            <ul class="question-upload-picture clearfix">
                                                <li>
                                                    <img id="def-question-img" th:src="@{{path}/front/web/v3/img/default/default-course.gif(path=${staticPath})}" width="auto" height="120" class="img-rounded">
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="mt5 hLh30">
                                            <section class="pull-left hand" id="qa-image-upload-box">
                                                <a href="javascript:void(0)" class="c-333 btn btn-info btn-sm">
                                                    <i class="fa fa-picture-o fs14 mr5"></i>
                                                    添加图片
                                                </a>
                                            </section>
                                            <small class="fs12 c-999 ml10">(最多四张图片)</small>
                                        </div>
                                        <div class="form-inline mt20 form-q-code">
                                            <div><label><span class="fs14 c-333">拼图验证码</span></label></div>
                                            <div class="form-control verifyWrap" id="verifyWrap">
                                                <div class="verifyLoading"><span class="fs12 c-999">加载中...</span></div>
                                            </div>
                                            <!--<div class="form-group">
                                                <input type="text" placeholder="输入图形验证码" class="form-control" name="captcha">
                                            </div>
                                            <div class="form-group"><img class="v-code-pic" src="${ctx}/kaptcha.imgs" alt=""></div>
                                            <div class="form-group">
                                                <span class="v-code-change">
                                                    <small class="c-666 fs12">看不清？</small>
                                                    <a href="javascript:void(0)" id="toggle-code" title="换一换" class="c-info fs12"> 换一换 </a>
                                                </span>
                                            </div>-->
                                        </div>
                                        <div class="pt10 pb10 mb20 clearfix">
                                            <hr>
                                            <aside class="pull-right">
                                                <button id="submit" class="btn btn-block btn-w-m btn-lg unRadius btn-danger" type="button"><strong>提 交</strong></button>
                                            </aside>
                                            <label class="c-ccc fs12 unFw hand">
                                                <input class="i-checks" type="checkbox" name="privacy" value="2"/> 隐私提问-不被别人看到，只能在我的问答中显示
                                            </label>
                                        </div>
                                    </form>
                                </div>
                            </section>
                            <aside class="col-sm-4">
                                <div class="ml20 pl10 mr20 mt20 pt10">
                                    <div class="toQues-tips">
                                        <section class="bg-info text-center"><span class="fs16"><i class="fa fa-child fs24"></i> 提问的正确姿势</span></section>
                                        <div class="bg-fb pt10 pl10 pr10 pb10">
                                            <div class="ml10 mr10 mt10 mb10 pb10">
                                                <p class="fs12 c-999 pt10">1、问题要具体、语句通顺，不寻求模糊空洞的答案。广告等违反社区规则的提问被删除并给予处罚。</p>
                                                <p class="fs12 c-999 pt10">2、句式、标点符号使用严谨，问题尽量不含有与问题本身无关的词语（如：跪求大神，急急急）。</p>
                                                <p class="fs12 c-999 pt10">3、打上正确的标签、添加悬赏将有助于更快地获得满意回答。</p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </aside>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div data-th-replace="layout/footer"></div>
        <script type="text/javascript" th:src="@{{path}/common/libs/verify-code/verify-code.js?v={v}(path=${staticPath},v=${v})}"></script>
        <script type="text/javascript" th:src="@{{path}/common/webuploader/webuploader.min.js?v={v}(path=${staticPath}, v=${v})}"></script>
        <script type="text/javascript" th:src="@{{path}/front/web/business/upload/web-common-upload.js?v={v}(path=${staticPath},v=${v})}"></script>
        <script type="text/javascript" th:src="@{{path}/common/jsencrypt/jsencrypt.min.js?v={v}(path=${staticPath},v=${v})}"> </script>
        <script type="text/javascript" th:src="@{{path}/front/web/business/qa/question/save-qa-question.js?v={v}(path=${staticPath},v=${v})}"></script>
        <script type="text/javascript" th:src="@{{path}/front/web/business/qa/question/qa-question-right.js?v={v}(path=${staticPath},v=${v})}"></script>
        <script type="text/javascript" th:src="@{{path}/front/web/business/qa/common/qa-common.js?v={v}(path=${staticPath},v=${v})}"></script>
        <script th:inline="javascript" type="text/javascript">
            var publicKey = [[${keyMap['publicKey']}]];
            var sign = [[${keyMap['sign']}]];
            var questionFee = [[${questionFee}]];
            var teacherName = [[${teacherName}]];

        </script>
    </body>
</html>